
package ch.hearc.coursJava.moo.heritage.entrainement;

public class Cercle extends Formes
	{

	/*------------------------------------------------------------------*\
	|*							Constructeurs							*|
	\*------------------------------------------------------------------*/
	public Cercle(String nom, double r)
		{
		super(nom);
		this.rayon = r;
		}

	public Cercle(Cercle source)
		{
		this(source.getNom(), source.rayon);
		}

	/*------------------------------------------------------------------*\
	|*							Methodes Public							*|
	\*------------------------------------------------------------------*/

	@Override
	public double aire()
		{
		return (rayon * rayon * Math.PI);
		}

	@Override
	public double perimetre()
		{
		return (2 * Math.PI * rayon);
		}

	@Override
	public Cercle cloneOf()
		{
		return new Cercle(this);
		}

	/*------------------------------*\
	|*				Set				*|
	\*------------------------------*/

	/*------------------------------*\
	|*				Get				*|
	\*------------------------------*/

	/*------------------------------------------------------------------*\
	|*							Methodes Private						*|
	\*------------------------------------------------------------------*/

	/*------------------------------------------------------------------*\
	|*							Attributs Private						*|
	\*------------------------------------------------------------------*/

	private double rayon;

	}
